#include "StdAfx.h"
#include "LIFO.h"


LIFO::LIFO(void)
{
}


LIFO::~LIFO(void)
{
}


string LIFO::ToString() const{
	stringstream s;
	for (list<int>::const_iterator i = _list.begin() ; i != _list.end(); ++i){
		s << "|" << *i ;
	}
	s<< "|<->";
	return s.str();
}

unsigned LIFO::GetTaille() const{
	return _list.size();
}

void LIFO::Add (int val){
	_list.push_back(val);
}

int LIFO::Get () const{
	return _list.back();
}

void LIFO::Supp(){
	_list.pop_back();
}